﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp9
{
    class Program
    {
        static void Main(string[] args)
        {
          
            Dictionary<string, string> dict1 = new Dictionary<string, string>();
            dict1.Add("中国", "China");
            Console.WriteLine("请输入一个中文：");
            string str = Console.ReadLine();
            if (dict1.ContainsKey(str))
            {
                Console.WriteLine("Key:{0},Value:{1}", str, dict1[str]);
            }
            else Console.WriteLine("没有这个单词");
            Dictionary<int, Tuple<string,string>> dict2 = new Dictionary<int, Tuple<string, string>>();
 

            dict2.Add(111, new Tuple <string, string>("九江", "南昌"));
            Console.WriteLine("请输入一个车次：");
            int c = Convert.ToInt32(Console.ReadLine());
            if (dict2.ContainsKey(c))
            {
                Console.WriteLine("始发站和终点站分别是:{0}", dict2[c]);
            }
            else Console.WriteLine("没有这个车次");
            foreach (var key in dict1.Keys)
            {
                Console.Write("{0}\t", key);
            }
            
            foreach (var key in dict2.Keys)
            {
                Console.Write("{0}\t", key);
            }
            Console.ReadKey();

        }
    }
}
